package chapter2;

public class ReflectServcicerImpl {

    public void sayHello(String name){
        System.out.println("hello  " + name);
    }

    public ReflectServcicerImpl getInstance(){
        ReflectServcicerImpl obj = null;
        try {
            obj = (ReflectServcicerImpl) Class.forName("chapter2.ReflectServcicerImpl").newInstance();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return obj;
    }

    public static void main(String[] args) {

    }
}
